home *** CD-ROM | disk | FTP | other *** search
- vlink V0.8 VBCC ANSI C Compiler Reference Manual vlink V0.8
-
- NAME
- vlink - linker for multiple file formats
-
- SYNOPSIS
- vlink [-dhrstvwxMRSX] [-B linkmode] [-b targetname] [-baseoff offset]
- [-F filename] [-L library-search-path] [-l library-specifier]
- [-multibase] [-nostdlib] [-o filename] [-sc] [-sd] [-T script]
- [-V version] [-y symbol] input-files...
-
- DESCRIPTION
- vlink combines the object and archive files given on the command line
- into a new object file. The output object file is either an executable
- program, a shared object suitable for loading at run-time, or an
- object file that can once again be processed by vlink. Object files
- and archives are processed in the order given on the command line.
-
- The file format of an input object file is determined automatically
- by vlink. The default output file format is compiled in (see -v)
- and may be changed by -b.
-
- Supported file formats:
-
- amigaos
- The AmigaDos hunk format for M68k. Requires AmigaOS 2.04.
- No shared objects. Small data offset: 0x7ffe. Linker
- symbols: _DATA_BAS_, _DATA_LEN_, _BSS_LEN_ (PhxAss),
- _LinkerDB, __BSSBAS, __BSSLEN (SASC/StormC), __DATA_BAS,
- __DATA_LEN, __BSS_LEN, __RESIDENT (DICE-C), ___machtype,
- ___text_size, ___data_size, ___bss_size (GNU-gcc).
- Automatic constructor/destructor function tables: __ctors,
- __dtors.
-
- amigaehf
- An extension of the AmigaDOS hunk format for the PowerPC,
- 32-bit, big endian, as introduced by Haage&Partner GmbH. No
- executables (they are in amigaos format) or shared objects.
- The same linker symbols, constructors/destructors as under
- amigaos are supported. Additionally, "@_name" symbols will
- be created on demand (when referenced).
-
- elf32ppcbe
- ELF (executable linkable format) for PowerPC, 32-bit,
- big endian. Small data offset: 0x7ff0. Linker symbols:
- _SDA_BASE_ and _SDA2_BASE (EABI only). Automatic construc-
- tor/destructor function tables will be placed into the
- sections .ctors and .dtors.
-
- elf32powerup
- ELF PowerPC 32-bit big endian for the PowerUp turbo boards
- from Phase5. Main difference to elf32ppcbe is the format
- of the executable (which is a relocatable object) and a new
- linker symbol, _LinkerDB, for vbccppc-compatibility.
-
- a.out
- Currently supported: aoutbsd68k (NetBSD/68k), aoutbsd68k4k
- (NetBSD/68k 4K page size), aoutsun010 (SunOS 68010 and
- AmigaOS 68000/010), aoutsun020 (SunOS 68020 and AmigaOS
- 68020-68060).
- Small data offset: 0x7ff0 (unused). Linker symbols:
- _etext, _edata, _end, __GLOBAL_OFFSET_TABLE_,
- __PROCEDURE_LINKAGE_TABLE_, __DYNAMIC.
-
- rawbin1
- Absolute raw binary file. The sections and base addresses
- have to be specified by a linker script (option -T). Gaps
- between sections are filled with 0-bytes. Without a linker
- script, the raw binary will be relocated to base address 0.
-
- rawbin2
- Like rawbin1. The only difference is, that a separate file
- will be created for every section. The file name will get
- the section's base address appended.
-
- srec19, srec28, srec37
- Motorola S-Record format. No symbols. Output format only.
- Without a linker script, the raw binary will be relocated
- to base address 0.
-
-
- The options are as follows:
-
- -Bdynamic
- Specifies that linking against dynamic libraries can take
- place. If a library specifier of the form -lx appears on
- the command line, ld searches for a library of the from
- libx.so.n.m (see the -l option) according to the search
- rules in effect. If such a file can not be found a tradi-
- tional archive is looked for. This options can appear
- anywhere on the command line and is complementary to -Bstatic.
-
- -Bstatic
- The counterpart of -Bdynamic. This option turns off dynamic
- linking for all library specifiers until a -Bdynamic is once
- again given. Any explicitly mentioned shared object encoun-
- tered on the command line while this option is in effect is
- flagged as an error.
-
- -Bshareable
- Instructs the linker to build a shared object from the object
- files rather than a normal executable image.
-
- -Bsymbolic
- This option causes all symbolic references in the output to be
- resolved in this link-edit session. The only remaining run-
- time relocation requirements are base-relative relocations,
- ie. translation with respect to the load address. Failure to
- resolve any symbolic reference causes an error to be reported.
-
- -Bforcearchive
- Force all members of archives to be loaded, whether or not such
- members contribute a definition to any plain object files.
- Useful for making a shared library from an archive of PIC
- objects without having to unpack the archive.
-
- -b targetname
- Specifies target file format for the output file. See
- also "Supported file formats".
-
- -baseoff offset
- Defines section offset for base-relative relocations. The
- default offset is target-dependant (e.g. 0x7ffe for amigaos
- and 0x7ff0 for elf32ppcbe).
-
- -dc Force allocation of commons even when producing relocatable
- output.
-
- -dn Same as: -Bstatic
-
- -dy Same as: -Bdynamic
-
- -F filename
- A list of object file names is read from the specified file.
- Useful, if the number of objects exceeds the length of the
- command line.
-
- -h Prints a short help text.
-
- -L library-search-path
- Add path to the list of directories to search for libraries
- specified with the -l option. When a default search path
- was compiled in (see -v), then it is searched last.
-
- -l library-specifier
- This option specifies a library to be considered for inclusion
- in the output. If the -Bdynamic option is in effect, a shared
- library of the form lib<spec>.so.m.n (where m is the major,
- and n is the minor version number, respectively) is searched
- for first. The library with the highest version found in the
- search path is selected. If no shared library is found or
- the -Bstatic option is in effect, an archive of the form
- lib<spec>.a is looked for in the library search path.
- For amigaos/amigaehf file formats, the libraries are called
-
- -M Produce output about the mapping of segments of the input
- files and the values assigned to symbols in the output file.
-
- -multibase
- The default behaviour of vlink is to merge all sections
- which are accessed base-relative. This guarantees a single
- small data section, which can be accessed through a base
- register.
- If this is not desired - maybe you have several base re-
- gisters and small data sections - you can disable this
- behavoiur by specifying -multibase.
-
- -nostdlib
- Ignore default library search path, if one was compiled in.
-
- -o filename
- Specifies the name of the output file. Defaults to "a.out".
-
- -R If the target file format supports it, use the short
- format for relocations.
-
- -r Produce relocatable object file, suitable for another
- linker pass.
-
- -S Strip all debugger symbols from the output.
-
- -s Strip all symbols from the output.
-
- -sc Merge all code sections to a single code section.
-
- -sd Merge all data and bss sections to a single data-bss section.
-
- -T script
- Specifies a linker script, which defines the absolute
- locations for every section. The syntax is similar to
- that used in GNU linker scripts, but still very limited.
-
- -t Trace the linker's file accesses.
-
- -V version
- Minimum major version of shared object to be linked.
-
- -v Prints vlink version string, default library search path
- and implemented target file formats.
-
- -w Suppress all warning messages.
-
- -X Discard local symbols in the input files that start with the
- letter "L" or with a dot.
-
- -x Discard all local symbols in the input files.
-
- -y symbol
- Trace the manipulations inflicted on symbol.
-
- BUGS
- Target elf32ppcbe can't generate shared objects or executables.
- Target elf32powerup can't generate shared objects.
- Writing objects, shared objects or executables in a.out format is
- currently not supported.
- The following options are not really supported: -B, -dn, -dy, -S, -X.
- Option -R for ELF is untested and should be avoided (works fine
- for AmigaOS hunk format though).
- Real debugger support (source level debugging, etc.) is still
- missing for all target file formats.
-
-
- Frank Wille 16-Feb-2001 frank@phoenix.owl.de
-